home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / foxadr / list_for.frm < prev    next >
Text File  |  1995-05-08  |  2KB  |  114 lines

  1. VERSION 2.00
  2. Begin Form list_form 
  3.    Caption         =   "List of names"
  4.    ClientHeight    =   6240
  5.    ClientLeft      =   2835
  6.    ClientTop       =   2235
  7.    ClientWidth     =   7380
  8.    Height          =   6645
  9.    Left            =   2775
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   6240
  12.    ScaleWidth      =   7380
  13.    Top             =   1890
  14.    Width           =   7500
  15.    Begin CommandButton list_ref_but 
  16.       Caption         =   "&Refresh"
  17.       Height          =   435
  18.       Left            =   4740
  19.       TabIndex        =   5
  20.       Top             =   5640
  21.       Width           =   1875
  22.    End
  23.    Begin CommandButton list_canc_but 
  24.       Caption         =   "&Cancel"
  25.       Height          =   435
  26.       Left            =   2820
  27.       TabIndex        =   2
  28.       Top             =   5640
  29.       Width           =   1815
  30.    End
  31.    Begin CommandButton list_ok_but 
  32.       Caption         =   "&OK"
  33.       Height          =   435
  34.       Left            =   900
  35.       TabIndex        =   1
  36.       Top             =   5640
  37.       Width           =   1815
  38.    End
  39.    Begin Grid list_grid 
  40.       Height          =   4815
  41.       Left            =   300
  42.       ScrollBars      =   2  'Vertical
  43.       TabIndex        =   0
  44.       Top             =   600
  45.       Visible         =   0   'False
  46.       Width           =   6495
  47.    End
  48.    Begin Label Label2 
  49.       Caption         =   "Surname"
  50.       Height          =   315
  51.       Left            =   3360
  52.       TabIndex        =   4
  53.       Top             =   180
  54.       Width           =   2595
  55.    End
  56.    Begin Label Label1 
  57.       Caption         =   "Forename"
  58.       Height          =   315
  59.       Left            =   360
  60.       TabIndex        =   3
  61.       Top             =   180
  62.       Width           =   2595
  63.    End
  64. End
  65. Sub list_canc_but_Click ()
  66.  
  67. list_form.Hide
  68.  
  69. ' restore previous current record
  70.  
  71. criteria = "recnum = " + Str(curr_rec)
  72.  
  73. adr_ds.FindFirst criteria
  74.  
  75. upd_fields
  76.  
  77. End Sub
  78.  
  79. Sub list_ok_but_Click ()
  80.  
  81. list_grid.Col = 2
  82. recstr = list_grid.Text
  83.  
  84. If recstr <> "" Then
  85.  
  86.  
  87. criteria = "recnum=cint(" + recstr + ")"
  88.  
  89. adr_ds.FindFirst criteria
  90.  
  91. If adr_ds.NoMatch Then
  92.  
  93. adr_ds.MoveFirst
  94.  
  95. End If
  96.  
  97. Else
  98.  
  99. adr_ds.MoveFirst
  100.  
  101. End If
  102.  
  103.  
  104. list_form.Hide
  105.  
  106. upd_fields
  107.  
  108. End Sub
  109.  
  110. Sub list_ref_but_Click ()
  111. upd_list
  112. End Sub
  113.  
  114.